<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<jsp:include page="../links.jsp"></jsp:include>
</head>
<body>
	<script type="text/javascript">
		var customer_datagrid;
		var customer_searchForm;
		$(function() {
			customer_datagrid = $('#customer_datagrid').datagrid({
				url : getRootPath() + '/customerAction/c_datagrid.do',
				title : '客户表',
				iconCls : 'icon-save',
				pagination : true,
				pageSize : 10,
				pageList : [ 10, 20, 30, 40, 50 ],
				fit : true,
				fitColumns : true,
				nowarp : false,
				border : false,
				idField : 'cid',
				sortName : 'cid',
				sortOrder : 'asc',
				columns : [ [ {
					title : '客户编号',
					field : 'cid',
					width : 100,
					sortable : true
				}, {
					title : '客户姓名',
					field : 'cname',
					width : 100,
					sortable : true
				}, {
					title : '性别',
					field : 'cgender',
					width : 100,
					sortable : true
				}, {
					title : '联系地址',
					field : 'caddress',
					width : 100
				}, {
					title : '出生日期',
					field : 'cbirth',
					width : 150,
					sortable : true
				}, {
					title : '联系电话',
					field : 'ctel',
					width : 100
				}, {
					title : '公司名称',
					field : 'ccompany',
					width : 150
				}, {
					title : '职务',
					field : 'cposition',
					width : 100
				} ] ]
			});//datagrid end
			//过滤查询
			customer_searchForm = $('#customer_searchForm').form();
			doSearch = function() {
				//console.info('11');
				console.info(serializeObject(customer_searchForm));
				customer_datagrid.datagrid('load', serializeObject(customer_searchForm));
			};
			//重置
			cleanSearch = function() {
				customer_datagrid.datagrid('load', {});
				customer_searchForm.find('input').val('');
			};
		});
	</script>
	<div class="easyui-layout" fit="true" border="false">
		<div data-options="region:'north',title:'模糊查询条件：'" style="height: 100%;">
			<form id="customer_searchForm" method="post">
				<table clase="tableForm" style="width: 100%; height: 60%;">
					<tr>
						<th>编号</th>
						<td><input name="cid" /></td>
						<th>客户姓名</th>
						<td><input name="cname" /></td>
						<th>联系电话</th>
						<td><input name="ctel" /></td>
					</tr>
					<tr>
						<th>公司名</th>
						<td><input name="ccompany" /></td>
						<th>职务</th>
						<td><input name="cposition" /></td>
						<th></th>
						<td><a class="easyui-linkbutton" style="width: 25%" data-options="iconCls:'icon-search'"
							href="javascript:void(0)" onclick="doSearch();">查询</a>&nbsp;<a class="easyui-linkbutton" style="width: 25%"
							data-options="iconCls:'icon-redo'" href="javascript:void(0)" onclick="cleanSearch();">清空</a></td>
					</tr>
				</table>
			</form>
		</div>
		<div data-options="region:'center',title:''," style="overflow: hidden;">
			<table id="customer_datagrid">
			</table>
		</div>
	</div>
</body>
</html>